﻿using System;

namespace 泛型
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");
            //Show("ttt");
            //GeneriClass<int> generiInt = new GeneriClass<int>();
            //generiInt._T = 1;
            //GeneriClass<string> generiString = new GeneriClass<string>();
            //generiString._T = "你好";
            GeneriArrayClass<int> intArray = new GeneriArrayClass<int>(5);
            Random random = new Random();
            for (int i = 0; i < 5; i++)
            {
                intArray.setItem(i,random.Next(0, 100));
                Console.WriteLine("值是：{0}", intArray.getItem(i));
            }
        }

        static void Show<T>(T t)
        {
            Console.WriteLine(t.ToString());
        }
    }
}
